package com.huatai.datacenter.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huatai.datacenter.entity.dataquality.QualityRuleEntity;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author gusiyi
 * @version 1.0
 * @className QualityRuleService
 * @description 描述：数据质量规则service
 * @date 2023/6/1 10:48
 */
public interface QualityRuleService extends IService<QualityRuleEntity> {


	/**
	 * 获取数据质量规则清册
	 * @param qualityRuleEntity
	 * @return
	 */
	Page<QualityRuleEntity> selectQualityRuleList(QualityRuleEntity qualityRuleEntity);

	/**
	 * 保存数据质量规则
	 * @param qualityRuleEntity
	 * @return
	 */
	boolean insertQualityRule(QualityRuleEntity qualityRuleEntity);

	/**
	 * 根据id修改数据质量规则
	 * @param qualityRuleEntity
	 * @return
	 */
	boolean updateQualityRule(QualityRuleEntity qualityRuleEntity);

	/**
	 * 根据ids删除数据质量规则
	 * @param qualityRuleEntityList
	 * @return
	 */
	boolean deleteByIds(List<QualityRuleEntity> qualityRuleEntityList);

	/**
	 * 通过质量规则id校验数据质量
	 * @param checkValue
	 * @param ruleId
	 * @param dataModelId
	 * @param dataModelName
	 * @param fieldName
	 * @param executeTime
	 * @param nextExecuteTime
	 * @return
	 */
	boolean checkQualityRuleByFieldName(String checkValue, Long ruleId, Long dataModelId, String dataModelName, String fieldName, LocalDateTime executeTime, LocalDateTime nextExecuteTime);
}
